-----------------------------------------------------------------------
           DCS World sRGB gamma fix  (primarily for VR use)
        by Keijo "Kegetys" Ruotsalainen, http://www.kegetys.fi
-----------------------------------------------------------------------
  
For DCS World version 2.5.3.23788. Using with other versions may or 
may not work.

Fixes incorrect sRGB gamma conversion applied by the game. The stock
linear to sRGB space conversion is done by a simple raise to power
of 2.2, which results in elevated black levels.

This mod uses sRGB conversion from w3c sRGB specification. More correct
version would be IEC 61966-2-1, but applying the gamma slider setting
from video options is easier by following older w3c spec. Difference in
practice is likely unperceivable.


Install:
- Backup your Bazar/shaders/shaders/deferred/deferredCommon.hlsl
- Extract file from this zip
- Remove terrain metacaches. For example:
   Mods\terrains\Caucasus\misc\metacache\dcs
   Mods\terrains\Nevada\misc\metacache\dcs
   Mods\terrains\???\misc\metacache\dcs
  rename those directories to dcs.old or similar. This ensures
  the metashaders will be recompiled correctly.
- Run DCS World. The shaders will be compiled as they are used
  for the first time, so first startup and loading of mission will
  take a while (can be 5 minutes or more). While playing you can
  also see some stutters when new shaders are compiling for the 
  first time.
- Increase your gamma slighly from video options to get equivalent
  result as default. Gamma of 2.4 is approximately the same as 2.2 before.  

Uninstall:
- Restore Bazar/shaders/shaders/deferred/deferredCommon.hlsl backup
- Restore terrain metacaches
- Delete files from C:\Users\<user>\Saved Games\DCS\fxo and metashaders2
  directories.